Storage system

ABSTRACT

A storage system according to an aspect of the present invention includes one or more storage devices for storing write data to which a write request from a host computer is directed, and a storage controller that provides one or more volumes to the host computer. Further, the storage system manages the time when a write request is last received from the host computer for each partition within the volume. Then, the storage controller performs a deduplication process upon detecting the partition not receiving a write request for a predetermined time or more from the time when the write request is last received.

TECHNICAL FIELD

The present invention relates to a storage system.

BACKGROUND ART

A storage system includes a plurality of storage devices for storingdata as well as a storage controller for controlling the storagedevices, and is intended to provide high-capacity data storage space toa host computer.

The storage system is required to store a large amount of data at a lowcost. In order to satisfy this requirement, there is known a techniquethat reduces the size of write data received from a host and stores thewrite data in a storage device. When write data is reduced in size andthen stored in the storage device, the data storage costs (the bit costof the storage medium, the power consumption cost of the storage device,or other costs) can be reduced. In order to reduce the data size, thereis a technique that reduces the data size while maintaining the meaningof the data by using a lossless compression algorithm. This process isreferred to as “lossless compression” or “compression”.

When data is compressed and stored in a storage device, the overhead ofthe compression process occurs in writing and the overhead of thedecompression process of compressed data occurs in reading, which mayresult in a reduction in access performance. In other words, thereduction in the amount of stored data and the access performance have atread off relationship. In order to avoid this, there is a techniquethat selectively performs data compression. For example, PatentLiterature 1 discloses a method that, in a storage system that manages aplurality of storage tiers, reduces the amount of stored data whilepreventing the reduction in access performance, for example, bycompressing and storing data to be moved to a lower tier.

Further, as another technique for reducing the amount of data to bestored, there is also a deduplication technique. For example, when astorage system detects that a plurality of pieces of data having thesame content are present in the storage system, the technique leaves oneof the pieces of data in a storage device within the storage system, anddoes not store the remaining data in the storage device. The amount ofwrite data stored in the storage device can be reduced to less than theamount of write data received from the host by using either thededuplication technique or the lossless compression technique. Thus, ina broad sense, it can be said that the deduplication technique is alsoone of the compression techniques.

CITATION LIST Patent Literature

Patent Literature 1: U.S. Pat. No. 8,359,444

SUMMARY OF INVENTION Technical Problem

When data is compressed, the compression ratio (or the amount of datashrinkage) can vary depending on the data content. For this reason,there is a possibility that the amount of data to be stored in thestorage device is hardly reduced although compression or deduplicationprocess is applied to the data. In this case, the access performance isalso reduced and the storage cost of data is not reduced as well. Inorder to provide a high performance storage system at low bit cost, itis necessary to prevent the occurrence of such a situation.

Solution to Problem

A storage system according to an aspect of the present inventionincludes one or more storage devices for storing write data to which awrite request from a host computer is directed, and a storage controllerthat provides one or more volumes to the host computer. The storagesystem holds the last write time, which is the time when a write requestis last received from the host computer, for each partition within thevolume. Then, when detecting a partition on which write request is notreceived for a predetermined period or more from the last write time,the storage controller performs a deduplication process. Further, withrespect to a partition with a low deduplication ratio as a result of thededuplication process of the partition, the storage controller performsa process for returning the partition to the state in which thededuplication process is not performed.

Advantageous Effects of Invention

According to the present invention, it is possible to provide a highperformance storage device at low bit cost.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a logical configuration diagram of a computer system includinga storage system according to an embodiment.

FIG. 2 is a diagram showing the state transition of a logical page.

FIG. 3 is a block diagram of the storage system.

FIG. 4 is a diagram showing the mapping relationship between a logicalpage and a physical page.

FIG. 5 is a configuration example of a logical page management table.

FIG. 6 is a configuration example of a mapping table.

FIG. 7 is a configuration example of a pool management table.

FIG. 8 is a configuration example of a search table.

FIG. 9 is a configuration example of a dereference table.

FIG. 10 is a configuration example of a following pointer.

FIG. 11 is a flow chart of a deduplication processing unit.

FIG. 12 is a diagram showing the flow of the deduplication process.

FIG. 13 is a flow chart of a deduplication cancellation unit.

FIG. 14 is a flow chart of the transition process.

FIG. 15 is a flow chart of the write process.

FIG. 16 is a flow chart of the read process.

FIG. 17 is a flow chart of the physical page release process.

FIG. 18 is a flow chart of the shared data determination/duplicationprocess.

FIG. 19 is a flow chart of the mapping switch process.

DESCRIPTION OF EMBODIMENTS

Hereinafter, some embodiments will be described with reference to theaccompanying drawings.

Note that in the following embodiment, the processing performed within astorage system may be described using “program” as the subject of asentence. Actually a processor (CPU) of the storage system executes aprogram to perform the process described in the program, and so thesubject of the process is the processor (CPU). However, the content ofthe process may be described using program as the subject of thesentence in order to prevent the description becoming too long. Inaddition, part or whole of the program can be implemented in dedicatedhardware. Further, various programs described below can be provided by aprogram distribution sever or a storage medium that the computer canread, and can be installed in each device that performs each program.The storage medium that the computer can read is a non-transitorycomputer readable medium such as, for example, IC card, SD card, or anon-volatile storage medium such as DVD.

Before giving a description of an embodiment, various terms used in theembodiment are described.

“Volume” means storage space that a target device such as a storagesystem or a storage device provides to an initiator device such as ahost computer. When the initiator device issues a data write request toan area on the storage space, the data is stored in the area on thetarget device mapped to the area. The storage system according to thepresent embodiment provides a virtual volume, which is formed by theso-called Thin Provisioning technique, to the host as a volume. Thevirtual volume is such that the storage device is not mapped to the areaon the storage space in the initial state (immediately after the virtualvolume is defined). Once the initiator device (host) issues a write datarequest to an area on the storage space, the storage device dynamicallydetermines the storage device to be mapped to the area.

“Deduplication process” is a process that, when a plurality of pieces ofdata having the same content are present in the storage system, leavesonly one in the storage system and removes other data from the storagesystem. A process for determining whether there is data having the samecontent in the storage system is referred to as a “duplicationdetermination” process. It should be noted that, unless otherwisestated, the deduplication process is the process that includes theduplication determination process.

In the storage system according to the embodiment described below, theduplication determination is performed for each data of a given sizethat is called a deduplication block. In the following embodiment, adescription is given of an example in which the size of thededuplication block is 8 KB. However, the deduplication block can alsobe set to a size other than 8 KB. The data having the same content isreferred to as the “duplicate data”.

The determination process will take a long time if two data are comparedbit by bit or byte by byte in deduplication determination. For thisreason, in general a device that performs duplication determinationperforms a predetermination operation (for example, an operation usingthe hash function, or the like) on the data to be compared, andgenerates a feature amount with a small size (for example, no largerthan 8 bytes) to perform the deduplication determination by using thegenerated feature amount. In the following embodiment, the featureamount generated from data is referred to as “fingerprint”. Thefingerprint may also be abbreviated as FP.

In the embodiment described below, when the value of FP calculated fromdata A is H, the value H is referred to as FP of data A. Conversely, thedata A may be referred to as “data having FP H”. Further, the area(deduplication block) in which data A is written may also be referred toas “area (deduplication block) having FP H”.

In the present embodiment, “collision” means that when each FP isgenerated by applying a predetermined operation to each of a pluralityof different data, the generated FPs are the same. Collisions can occurwhen feature amounts with a small size are calculated using the hashfunction or other mathematical functions.

“Deduplication ratio” is the index value that indicates the efficiencyof reducing the amount of storage area consumption by the deduplicationprocess. For example, the deduplication ratio is the value expressed bythe ratio between the amount of data written to the volume of thestorage device, and the amount of storage area that the storage systemused (consumed) for data storage. In the deduplication process, when alarge amount of data having the same content are stored, only one iswritten to the storage area of the storage device (the storage area isconsumed) and the other data are not written to the storage area (thestorage area is not consumed). As a result, the efficiency of reducingthe amount of storage area consumption is increased.

Embodiment

(1) Summary of Invention

The outline of the deduplication method that a storage system accordingto an embodiment of the present invention performs is first describedwith reference to FIGS. 1, 2, and 4. FIG. 1 is a diagram showing theconfiguration of a virtual volume that the storage system according tothe embodiment of the present invention provides to a computer.

A storage system 1 includes a plurality of storage devices (not shown inFIG. 1), and stores write data from a host computer 5 (hereinafterreferred to as “computer 5”) into the storage device. The storage deviceprovides a storage area of a predetermined size to the storage system 1.However, the storage system 1 does not provide the storage spaceprovided by the storage device directly to the computer 5. The storagesystem 1 provides one or more virtual storage spaces, which aredifferent from the storage space that the storage device has, to thecomputer 5. The virtual storage space is referred to as “virtualvolume”. FIG. 1 shows an example in which two virtual volumes (virtualvolume 16, virtual volume 20) are provided to the computer 5.

The storage system 1 manages the storage space of the virtual volume bydividing it into a plurality of segments of a predetermined size (as anexample, 42 MB). In the present embodiment, this segment is referred toas “logical page”. A unique identifier is added to each logical pagewithin the virtual volume. This identifier is referred to as the logicalpage identifier (or the logical page number).

The virtual volume is the volume formed by using a known technique suchas Thin Provisioning. Upon reception of an access request directed tothe logical page of the virtual volume, the storage system 1 dynamicallyallocates (maps) the storage area of the storage device to the logicalpage. In other words, until an access request to each logical page isreceived from the computer 5, the storage area is not allocated to thelogical page.

The storage system 1 also has a managing concept for managing thestorage area (the storage area that the storage device provides) that isto be allocated to the logical page. This is referred to as “storagepool” or “pool”. In FIG. 1, the storage pool is expressed as acylindrical object 17. The storage system 1 segments the storage area ofthe pool into areas of the same size as the logical page (or areas of asize larger than the logical page), and manages the segmented areas byadding an identifier to each area. This segmented area is referred to as“physical page”, and the identifier added to the physical page isreferred to as “physical page identifier” or “physical page number”.

When receiving a write request to the virtual volume from the computer5, the storage system 1 converts the address of the write target areaincluded in the write request into a logical page number, and identifiesthe logical page including the write target area. When the physical pageis not allocated to the identified logical page, the storage system 1selects an unused physical page (a physical page that is not yetallocated to the logical page) within the pool 17, and allocates (maps)the selected physical page to the logical page to be accessed. The writedata from the computer 5 is stored in the physical page mapped to thelogical page to be accessed.

Further, the storage system 1 stores the correspondence (mapping)between the logical page and the physical page allocated to the logicalpage into a logical page management table 126. When receiving a readrequest to the logical page, the storage system 1 identifies the storagearea allocated to the logical page by referring to the logical pagemanagement table 126, and reads the data from the identified storagearea.

The storage system 1 according to the present embodiment determinesthat, of the logical pages to which write data is written from thecomputer 5, a logical page corresponding to a given condition is treatedas a deduplication process target, and performs the deduplicationprocess on the particular logical page. The given condition is forexample a logical page with low write frequency, and more specifically,is a logical page to which write data is not written for a predeterminedtime or more. The logical page on which the deduplication process wasperformed is referred to as “deduplication logical page”. Conversely, alogical page other than the deduplication logical page may be referredto as “normal logical page”.

FIG. 4 is a conceptual diagram showing a state in which a physical pageis allocated to a normal logical page, as well as a state in which aphysical page is allocated to a deduplication logical page. FIG. 4(a)shows a state in which a physical page is allocated to a normal logicalpage. One physical page 171 c is allocated to one normal logical page161 b. For example, when the computer 5 issues a request to the storagesystem 1 to write data to an area 361 at the k-th byte from the top ofthe normal logical page 161 b, the storage system 1 stores the dataspecified by the write request into the area 371 at the k-th byte fromthe top of a physical page 171 c that is allocated to the normal logicalpage 161 b. This relationship is maintained, so that when managing themapping between the normal logical page and the physical page, thestorage system 1 can only manage the physical page number of thephysical page allocated to the logical page for each logical page.

FIG. 4(b) shows a state in which a physical page is allocated to adeduplication logical page. The storage system 1 segments the areawithin the logical page into partial areas of a predetermined size (forexample, 8 KB), and allocates the area of the physical page for eachpartial area. In the present embodiment, the deduplication determinationis performed for each partial area, so that the partial area is referredto as “deduplication block”. On the other hand, the area on the physicalpage allocated to the deduplication block is referred to as “datablock”.

Note that when the normal logical page is treated as a deduplicationlogical page, the physical page having been allocated to the normallogical page is removed (to a state in which the physical page is notallocated). Then, the data having been stored in the physical page ismoved to the area (data block) on the physical page that is to beallocated to the deduplication block. The data block is the area on thephysical page belonging to the pool 17. The mapping information of thededuplication block and the data block is stored in a mapping table 1267described below.

In the deduplication process that the storage system 1 performs, dataare compared for each deduplication block. The outline of thededuplication process is described with reference to FIG. 4(b). In FIG.4(b), reference numeral 161 a denotes a deduplication logical page, anda data block 19 c within a physical page 171 d is allocated to adeduplication block 18 b. Here, it is assumed that the storage system 1performs the deduplication process on a logical page 201 x. The storagesystem 1 compares the data written to a deduplication block 21 c of thelogical page 201 x with the content of the data stored in each datablock of the physical page 171 d. As a result of the comparison, whenthe data written to the deduplication block 21 c is the same as the datastored in the data block 19 c, the storage system 1 allocates the datablock 19 c to the deduplication block 21 c. Then, the storage system 1does not newly write the data, which is written to the deduplicationblock 21 c, to the physical page 171 d. As a result, the data block 19 cis allocated to two deduplication blocks (18 b and 21 c). In the presentembodiment, the state in which a data block is allocated to a pluralityof deduplication blocks is expressed as “a data block is shared by aplurality of deduplication blocks” or “a plurality deduplication blocksshare one data block”.

With this configuration, when receiving a read request either to thededuplication block 18 b or to the deduplication block 21 c from thecomputer 5, the storage system 1 reads the data A from the data block 19c and returns to the computer 5. Further, there is no need to allocatedifferent data blocks to the block deduplication block 18 b and thededuplication block 21 c, which actually allows for a reduction in theamount of data stored in the storage pool 17 (in other words, the amountof storage area consumption in the storage device) to ½ of its originalamount. If n deduplication blocks share one data block, the amount ofstorage area consumption is reduced to 1/n.

In this way, in the storage system 1 according to the presentembodiment, the logical page may be treated as a deduplication logicalpage or treated as a normal logical page. The storage system 1 storesinformation on the state of each logical page to manage which state thateach logical page is in. Each state of the logical page is describedwith reference to FIG. 2.

FIG. 2 is a diagram showing the state transition of a certain logicalpage. In the initial state (immediately after a virtual volume isdefined and no physical page is allocated to the logical page), thestate of the logical page is P. When data is written from the computer 5to the logical page, the storage system 1 changes the state of thelogical page to X.

When a write request to the logical page whose state is X did not comefrom the computer 5 for a predetermined time or more, the storage system1 changes the state of the logical page to Q. The logical page whosestate is Q is a deduplication logical page on which the deduplicationprocess is to be performed. When a write request comes from the computer5 to the logical page whose state is Q (deduplication logical page), thestorage system 1 changes again the state of the logical page to X. Thisis because the overhead of the process such as deduplicationdetermination increases when data is stored to the deduplication logicalpage, resulting in a reduction in access performance.

When a write request does not come from the computer 5, the state (stateQ) of the deduplication logical page is basically maintained. However,when the effect of reducing the amount of storage area consumption inthe deduplication logical page is small, for example, when most of thedata written in each deduplication block of the deduplication logicalpage are different from other data, it does not contribute to thereduction in the bit cost of the storage system 1 and may even lead to areduction in access performance. For this reason, when there is adeduplication logical page in which the effect of reducing the amount ofstorage area consumption is small, the storage system 1 changes thestate of the deduplication logical page from Q to P.

Upon determination of the deduplication logical page whose state shouldbe changed from Q to P, the storage system 1 uses the deduplicationratio of the logical page. Note that the “deduplication ratio of thelogical page” in the present embodiment is defined by the followingequation.

It is assumed that the number of deduplication blocks within the logicalpage is P, and of the deduplication blocks of the logical page(deduplication logical page), the number of deduplication blocks towhich data blocks, which have been allocated to other deduplicationblocks, are allocated is W (in other words, of the data blocks allocatedto the deduplication logical page, the number of data blocks shared by aplurality of deduplication blocks is W). Note that the number ofdeduplication blocks P within the logical page is a fixed value that canbe obtained by dividing the logical page size (for example, 42 MB) bythe size of the deduplication block (for example, 8 KB). At this time,the deduplication ratio D of the logical page is expressed by thefollowing equation: D=W÷P

Since P is a fixed value, the deduplication ratio D increases when W islarge. Thus, when D is large (or close to 1), it means that the amountof storage area consumption in the storage device is small (the effectof reducing the storage area by deduplication is high). On the otherhand, when D is small (or close to 0), it means that the effect ofreducing the storage area by deduplication is small. In the presentembodiment, when there is a deduplication logical page whosededuplication ratio is less than a predetermined threshold, the storagesystem 1 changes the state of the deduplication logical page from Q toP.

When the state of the logical page is changed from Q to P, the storagesystem once reads the data of the logical page into a temporary storagearea such as a cache memory within the storage system 1, allocates a newphysical page to the logical page, and writes the data again to theallocated physical page to change to the state in which thededuplication process is not performed. The storage system according tothe present embodiment provides a balance between high accessperformance and low bit cost by limiting logical pages as the targets ofthe deduplication process, in consideration of the access frequency oflogical pages as well as the reduction efficiency of the amount ofstorage area consumption.

Note that the logical page of the state P and the logical page of thestate X are different in the following point. The logical page of thestate X can be changed to the state Q. More specifically, when a writerequest does not come from the computer 5 for a predetermined time ormore, the state of the logical page is changed to Q. On the other hand,in the case of the logical page of the state P, the state is not changedto Q. This is because, as a result of the determination that the effectof reducing the amount of storage area consumption is small, the logicalpage of the state P is the logical page whose state is changed from Q toP (or is the logical page in which write data has never been written bythe computer 5 and to which no physical page is allocated). It isapparent that the effect of reducing the amount of storage areaconsumption is small (or none) even if the state of such a logical pageis changed to Q, so that the storage system 1 does not change the stateof the logical page of the state P to Q. This helps to prevent frequentchanges in the state of the logical page (and so prevent the increase inthe processing overhead).

(2) System Configuration

FIG. 3 shows a hardware configuration example of the computer systemincluding the storage system 1 according to the present embodiment. Thestorage system 1 includes a storage controller 10 and a plurality ofstorage devices 15 connected to the storage controller 10.

The storage device 15 is used in the storage system 1 to store writedata from an upper device such as the computer 5. For example, HDD (HardDisk Drive) that uses a magnetic disk as a storage medium, or SSD (SolidState Drive) that uses a non-volatile semiconductor memory, such as aflash memory, as a storage medium is used for the storage device. In thepresent embodiment, the storage device 15 may also be expressed as“drive 15”. As an example, the storage device 15 is connected to thestorage controller 10 by a transmission line (SAS link) that conforms tothe SAS (Serial Attached SCSI) standard, or a transmission line (PCIlink) that conforms to the PCI (Peripheral Component Interconnect)standard.

The storage controller 10 at least has a processor (also referred to asCPU) 11, a system memory 12, a cache memory 14, and an interface (notshown) to connect to SAN (Storage Area Network) 6. As an example, theSAN 6 is a network formed by using a fiber channel.

The processor 11 performs various types of control on the storage system1. The system memory 12 is used for storing programs that the CPU 11executes as well as management information that the CPU 11 uses toexecute the programs. On the other hand, the cache memory 14 is used fortemporarily storing the write data received from the computer 5 as wellas the read data read from the storage device 15.

A volatile storage medium such as DRAM or SRAM is used for the systemmemory 12 and the cache memory 14. As another embodiment, it is possibleto configure the cache memory 14 with a non-volatile storage medium.Furthers, when a volatile storage medium is used for the cache memory14, an auxiliary power supply such as a battery can be added to thestorage system 1 to maintain the stored content of the cache memory 14at the time of the power outage.

Further, as still another embodiment, the storage system 1 may notinclude two types of memories (the system memory 12 and the cache memory14). In other words, the storage system 1 can be configured to includeonly one type of memory. In this case, the programs, managementinformation, and write data are stored in the same memory.

The computer 5 is an access request source to the storage system 1. Thecomputer 5 is a general-purpose computer such as PC (personal computer),and at least has a processor and a memory (not shown). The processorexecutes a program such as an application program that issues an I/Orequest to the virtual volume provided by the storage system 1.

(3) Management Information

Next, the management information and program content that the storagesystem 1 has will be described. The memory 12 of the storage system 1stores at least six types of management information, including a logicalpage management table 126, a mapping table 127, a pool management table128, a search table 129, a dereference table 130, and a followingpointer 131. The content of various types of management information willbe described below.

FIG. 5 shows the configuration of the logical page management table 126.The logical page management table 126 is a table for managing the stateof each logical page, in which the state and attribute information ofeach logical page is stored. The information stored in each column ofthe logical page management table 126 will be described below.

Virtual volume 1261 and logical page 1262 respectively store theidentifier of the virtual volume belonging to the logical page and theidentifier of the logical page.

Deduplication 1263 stores “valid” or “invalid”. When “valid” is storedin the deduplication 1263 of a certain record, this means that thelogical page managed in the record is deduplication logical page. When“invalid” is stored in the deduplication 1263, this means that thelogical page managed in the record is normal logical page.

Physical page 1264 stores the identifier of the physical page allocatedto the logical page. When the physical page is not allocated to thelogical page, NULL is stored.

Note that in general non-negative integers are used for the identifiersof virtual volumes and logical pages. However in FIG. 5, for the purposeof convenience, the reference numbers added to the virtual volumes, thereference numbers added to the logical pages, and the reference numbersadded to the physical pages, which are shown in FIG. 1 and otherfigures, are stored in each of the columns of the virtual volume 1261,the logical page 1262, and the physical page 1264. Similarly, withrespect to the management information described below, the referencenumbers of the virtual volumes, the logical pages, the physical pages,and the like, shown in FIG. 1 and other figures are stored in each ofthe columns for storing identifiers of virtual volumes, logical pages,physical pages, and the like.

State 1265 stores the state of the logical page. As described above, thestate of the logical page includes three states of P, Q, and X. Lastwrite time 1266 stores the last time a write request to the logical pagewas received from the computer 5.

Number of deduplicated blocks 1267 is the information which is effectivewhen the logical page is the deduplication logical page. Of thededuplication blocks within the logical page (deduplication logicalpage), the number of deduplication blocks, to which data blocks havingbeen already allocated to other deduplication blocks are furtherallocated by the deduplication process, is recorded in the number ofdeduplicated blocks 1267. It can be said that the greater the number ofdeduplicated blocks 1267, the greater the effect of reducing the amountof storage area consumption in the logical page. Hereinafter, thededuplication block holding the data without consuming the storage areaby allocating an existing data block by the deduplication process asdescribed above, may be referred to as the deduplication block alreadyreduced.

Next, the mapping table 127 is described with reference to FIG. 6. Themapping table 127 is the table for managing the mapping state of thededuplication block and the data block, in which information such as theidentifier of the deduplication block, and the identifier of the datablock allocated to the deduplication block is stored in each row(record). The information stored in each column of the mapping table 127will be described below.

Virtual volume 1271 and logical page 1272 respectively store theidentifier of the virtual volume to which the deduplication block to bemanaged belongs, and the identifier of the logical page. Then,deduplication block 1273 stores the identifier of the deduplicationblock to be managed. Fingerprint 1274 stores the fingerprint that iscalculated in the deduplication process for each deduplication block.

Physical page 1275 and data block 1276 respectively store the identifierof the physical page to which the data block allocated to thededuplication block to be managed belongs, and the identifier of thedata block.

Note that any information can be used for the identifier of thededuplication block or the data block, as long as the information canuniquely identify the deduplication block or the data block. In thepresent embodiment, the identifier of the deduplication block uses anaddress within the virtual volume to which the deduplication blockbelongs. On the other hand, the identifier of the data block uses arelative address within the physical page to which the data blockbelongs (an address in which the identifier of the first data block ofthe physical page is 0). However, in FIG. 6, in order to illustrate themapping relationship between the deduplication blocks and the datablocks shown in FIG. 4, the alphabets added to the deduplication logicalblocks shown in FIG. 4 are used as the identifiers of the deduplicationblocks, and the alphabets added to the data blocks are used as theidentifiers of the data blocks.

Reduced flag 1277 is information that indicates whether or not thededuplication block to be managed is the deduplication block alreadyreduced. When the deduplication block to be manages is the deduplicationblock already reduced, TRUE is stored in the reduced flag 1277, and ifnot, FALSE is stored.

The information on the physical page is stored and managed in the poolmanagement table 128. The content of the pool management table 128 willbe described with reference to FIG. 7.

Each record of the pool management table 128 stores information such asthe state of each physical page. A physical page 1281 stores theidentifier of the physical page to be managed, and a logical page 1283stores the identifier of the logical page to which the physical page isallocated. When the physical page is not allocated to the logical page(normal logical page), or when the area within the physical page is notallocated to the deduplication block, NULL is stored in the logical page1283.

Use state 1282 stores the use state of each physical page. The state ofthe physical page can include the state of being allocated to the normallogical page, the state of being used for allocation to thededuplication block, and the unused state. When the physical page isallocated to the normal logical page, “logical page” is stored in theuse state 1282. When the area within the physical page is allocated tothe deduplication block, “data block” is stored in the use state 1282.When the physical page is not allocated to the logical page and the areawithin the physical page is not allocated to the deduplication block,the state of the physical page is referred to as “unused state”. In thiscase, “unused” is stored in the use state 1282.

For example, when allocating the physical page to a certain logicalpage, of the records of the pool management table 128, the storagesystem 1 identifies one with “unused” for the use state 1282 todetermine that the physical page managed in the identified record isallocated to the logical page. Further, the storage system 1 stores theidentifier (physical page 1281) of the physical page determined to beallocated, into the logical page management table 126.

Note that the physical page is the area on one or a plurality of storagedevices 15. Thus, the storage system 1 also holds the information formanaging the mapping of the physical page, the storage device 15 inwhich the physical page is present, and the address on the storagedevice, in addition to the pool management table 128. For example, whenreceiving an access request from the computer 5, the storage system 1identifies the logical page corresponding to the area specified by theaccess request, and then identifies the physical page allocated to thelogical page. Then, the storage system 1 further identifies the addresson the storage device 15 to be accessed by referring to the mappinginformation. However, the mapping information and the method foridentifying the address of the access destination storage device 15 byusing the mapping information are known in the storage device using theThin Provisioning technique, and its detailed description is omitted inthe present embodiment.

The next describes the search table 129. The search table 129 is used inthe deduplication process. The deduplication process performs a processof determining whether or not the same data as the deduplication targetdata is already present in the storage pool 17. In order to speed up thedetermination process, the storage system 1 calculates a fingerprint foreach deduplication block, and stores the calculated fingerprint into thesearch table 129.

FIG. 8 shows an example of the search table 129. Of the columns of thesearch table 129, a fingerprint 1291 stores the fingerprint. Then, adeduplication block 1292 stores the positional information of thededuplication block with the fingerprint stored in the fingerprint 1291.As the positional information, the value which is a combination of theidentifier of the virtual volume to which the deduplication blockbelongs and the identifier (address within the virtual volume) of thededuplication block is stored. The records of the search table 129 arestored by sorting them in ascending order according to the values of thefingerprint 1291.

The deduplication block 1292 of a certain record may store a pluralityof pieces of positional information (in the case in which deduplicationdata is present). Further, there may be a case in which a plurality ofrecords with the same value of the fingerprint 1291 is present. This isbecause FPs may be the same even if the storage system 1 calculates FPfor a plurality of data with different contents.

When performing the deduplication determination on a certain data, thestorage system 1 calculates FP of the data, and determines whether thereis a record in which the same pattern as the calculated FP is stored inthe column “fingerprint 1291” of the search table 129. When such arecord is present, the storage system 1 further identifies (thepositional information of) the deduplication block by referring to thecolumn “deduplication block 1292” of the record. Further, the storagesystem 1 identifies the data block allocated to the deduplication blockby referring to the mapping table 127. Then, the storage system 1 readsthe data from the particular data block, and compares the read data withthe determination target data byte by byte to determine whether the twomatch.

FIG. 9 shows an example of the dereference table 130. The dereferencetable 130 is the table for managing the mapping information between thedata block and the deduplication block. Unlike the mapping table 127,the dereference table 130 is used for identifying the address of thededuplication block to which a data block to be managed is allocated,from the address of the data block.

Of the columns of the dereference table 130, a physical page 1301 and adata block 1302 respectively store the identifier of the physical pageto which a data block to be managed belongs, and the identifier of thedata block. The identifier of the data block uses, as described above,the relative address within the physical page to which the data blockbelongs. Deduplication block 1303 stores the positional information ofthe deduplication block to which data block to be managed is allocated.The positional information of the deduplication block is the value whichis a combination of the identifier of the virtual volume to which thededuplication block belongs, and the identifier of the deduplicationblock.

FIG. 10 shows an example of the following pointer 131. The followingpointer 131 is the information for managing the address of the datablock to be allocated, when it is necessary to allocate the data blockto the deduplication block. The following pointer 131 is a combinationof the identifier of a physical page and the identifier of a data block.The storage system 1 allocates the data block indicated by the followingpointer 131 to the deduplication block. After completing the allocation,the storage system 1 updates the content of the following pointer 131 tothe address next to the address currently stored in the followingpointer 131. When the data block at the end of the physical page isallocated to the deduplication block, the storage system 1 newly assignsan unused physical page for data block storage. Then, the storage system1 updates the following pointer 131 with the information including theidentifier of the physical page and the identifier of the data block atthe top of the physical page.

(4) Flow of Processing

The next describes the flow of various types of processing performed bythe storage system 1. The system memory 12 of the storage system 1stores at least five types of programs: an I/O processing unit 121, adeduplication processing unit 123, a deduplication cancellation unit124, a logical page change unit 125, and a physical page releaseprocessing unit 132. Note that the programs stored in the system memory12 are also referred to as the “storage control programs”. The processesperformed by such programs will be described below. Note that in thedrawings relating to the present embodiment, the character string “SP”placed in the front of each reference number represents “step”.

First, the main process performed by the I/O processing unit 121 isdescribed. The I/O processing unit 121 is the program for providingvirtual volume to an initiator device, such as the computer 5, toperform processing of an I/O request (read request or write request)received from the initiator device.

The flow of the read process is described with reference to FIG. 16. Thestorage system 1 receives a read request to the virtual volume from thecomputer 5. Then, the storage system 1 returns the data specified by theread request to the computer 5. This process is referred to as the readprocess.

Step 702: When the storage system 1 receives a read request from thecomputer 5, the I/O processing unit 121 calculates a logical page numberfrom the read destination address (LBA) included in the read request,and identifies the logical page included in the read destinationaddress. At the same time, the I/O processing unit 121 also calculatesan address within the logical page corresponding to the read destinationaddress. In the following description, the logical page identifiedherein is referred to as the “access target logical page”.

Step 703: Next, the I/O processing unit 121 refers to the logical pagemanagement table 126 to determine whether or not the access targetlogical page is the deduplication logical page. In this determination,of the records of the logical page management table 12, the I/Oprocessing unit 121 determines whether or not the state 1265 of therecord corresponding to the access target logical page is “Q”. When thestate 1265 is “Q” (SP703: Y), step 704 is performed next. Otherwise, theI/O processing unit 121 performs step 705 next.

Step 704: The I/O processing unit 121 refers to the mapping table 127 toidentify the positional information (a combination of the physical page1275 and the data block 1276) of the data block allocated to the areaspecified by the read destination address. Then, the I/O processing unit121 obtains the address of the storage device 15 in which the readtarget data is stored, by using this information.

Step 705: The I/O processing unit 121 refers to the logical pagemanagement table 126 to identify (the physical page number of) thephysical page allocated to the access target logical page. Further, theI/O processing unit 121 obtains the address of the storage device 15 inwhich the read target data is stored, based on the identified physicalnumber as well as the address within the logical page that is calculatedin step 702.

Step 706: The I/O processing unit 121 reads the data from the address ofthe storage device 15 obtained in step 704 or step 705, and stores theread data in the cache memory 14. Further, the I/O processing unit 121returns the data stored in the cache memory 14 to the computer 5 andends the process.

Next, referring to FIG. 15, a description is given of the flow ofprocessing (write process) when the storage system 1 receives a writerequest and write data to the virtual volume from the computer 5. Thisprocess is also performed by the I/O processing unit 121. Note that theinformation (LBA and data length) of the write destination position ofthe write data is included in the write request that the computer 5issues.

Step 602: The I/O processing unit 121 calculates the identifier (logicalpage number) of the logical page, which is the write destination of thewrite data, as well as the address within the logical page, from theinformation of the write destination position included in the writerequest. Further, the I/O processing unit 121 refers to the logical pagemanagement table 126. When the sate 1265 of the logical page which isthe write destination of the write data is P and the physical page 1264is NULL, the I/O processing unit 121 performs a process of allocatingthe physical page to the logical page. More specifically, the I/Oprocessing unit 121 selects a record with “unused” for the use state1282 by referring to the pool management table 128. The I/O processingunit 121 stores the identifier of the logical page, which is the writedestination of the write data, into the logical page 1283 of the record,and changes the value of the use state 1282 to “logical page”. Further,the I/O processing unit 121 stores the value of the physical page 1218that corresponds to the record selected here into the physical page 1264of the record of the logical page, which is the write destinationlogical page of the write data, of the records of the logical pagemanagement table 126.

Step 603: The I/O processing unit 121 stores the write data in the cachememory 14. At this time, the I/O processing unit 121 adds the identifierof the write destination logical page as well as the address within thelogical page into the write data, and stores in the cache memory 14.

Step 604: Of the records of the logical page management table 126, theI/O processing unit 121 stores the current time (the time at theexecution of step 604) into the last write time 1266 of the recordcorresponding to the write destination logical page.

Step 605: The I/O processing unit 121 refers to the state 1265 of therecord of the logical page management table 126 to determine whether ornot the state of the write destination logical page is “P”. When thestate of the write destination logical page is “P” (SP605: Y), the I/Oprocessing unit 121 changes the value of the state 1265 of the writedestination logical page to “X” (step 607), and next performs step 609.

Step 606: The I/O processing unit 121 refers to the state 1265 of therecord of the logical page management table 126 to determine whether thewrite destination logical page is the deduplication logical page. Whenthe state 1265 is “Q”, this means that the write destination logicalpage is the deduplication logical page. When the state 1265 is “Q”(SP606: Y), the I/O processing unit 121 next performs step 608. When thevalue of the state 1265 is not “Q” (SP606: N), step 608 is skipped.

Step 608: The I/O processing unit 121 calls the deduplicationcancellation unit 124 to perform the deduplication cancellation processon the write destination logical page. The deduplication cancellationprocess is performed by the deduplication cancellation unit 124. Theprocess of the deduplication cancellation unit 124 will be describedlater. By performing the deduplication cancellation process, the writedestination logical page is changed to the normal logical page (thestate 1265 is changed to X).

Step 609: The I/O processing unit 121 stores the data stored in thecache memory 14 in step 603 into the storage device 15. The process ofstoring the data, which is temporarily stored in the cache memory 14,into the storage device 15 is referred to as “destage process”. Similarto step 705 of FIG. 16, the I/O processing unit 121 refers to thelogical page management table 126 to identify the physical pageallocated to the write destination logical page, and further identifythe address of the storage device 15 in which the identified physicalpage is present. Then, the I/O processing unit 121 writes the datastored in the cache memory 14 into the address of the identified storagedevice 15. After the destage process, the I/O processing unit 121notifies the computer 5 of the completion of the write process, and endsthe write process.

Note that in the example described above, the storage system 1 performsa write-through process. In other words, after the destage process (step609), the completion of the write process is notified to the computer 5.However, as another embodiment, the cache memory 14 can also be used asa write-back cache. In this case, when the data received from thecomputer 5 is stored in the cache memory 14 (step 603), the I/Oprocessing unit 121 can notify the computer 5 of the completion of thewrite process. Further, in this case, the processing following step 605may not necessarily be performed immediately after the data is stored inthe cache memory 14, and may be performed at an arbitrary timing.

Next, the flow of processing that the logical page change unit 125performs is described with reference to FIG. 14. In the presentembodiment, this process is referred to as “transition process”. Thetransition process is a process of changing the state of a normallogical page that satisfies a predetermined condition, of the logicalpages of the virtual volume. The transition process is performed on eachvirtual volume at regular intervals. The following describes the flow ofthe processing when the storage system 1 performs the transition processon a specific virtual volume.

Step 402: Of the logical pages of the virtual volume, the logical pagechange unit 125 selects one logical page on which the process followingstep 403 has not been performed. The method of selecting the logicalpage here is arbitrary. For example, the logical page change unit 125can perform the process following step 403 in descending order from thefirst logical page of the virtual volume.

Step 403: The logical page change unit 125 refers to the logical pagemanagement table 126 to determine whether or not the state 1265 of theselected logical page is “X”. When the state 1265 is “X” (step 403: Y),step 404 is performed next. When the state 1265 is not “X” (step 403:N), steps 404 to 407 are skipped.

Step 404: The logical page change unit 125 refers to the last write time1266 of the selected logical page to calculate the difference betweenthe current time and the last write time 1266, and determines whetherthe difference is equal to or more than a predetermined value. When thedifference is equal to or more than a predetermined value (step 404: Y),this means that a write from the computer 5 does not occur in theselected logical page for a predetermined time or more. In this case,the logical page change unit 125 next performs step 405. When thedifference between the current time and the last write time 1266 is lessthan the predetermined value, step 405 to step 407 are skipped.

Step 405: The logical page change unit 125 calls the deduplicationprocessing unit 123 to perform the deduplication process on the selectedlogical page. This process is a process of changing the state of thenormal logical page to the state “Q” (namely, the process of changing tothe deduplication logical page). The details are described below.

Step 406: The logical page change unit 125 determines whether or not theselected logical page should be maintained as deduplication logicalpage. More specifically, of the records within the logical pagemanagement table 126, the logical page change unit 125 first counts thenumber of records in which the deduplication 1263 is “valid”, toidentify the number of deduplication logical pages within the storagesystem 1. Then, the logical page change unit 125 determines whether ornot the identified number is equal to or more than a threshold. When thenumber is less than the threshold, the logical page change unit 125determines that the selected logical page should be maintained asdeduplication logical page.

When the number of deduplication logical pages within the storage system1 is small (less than the threshold), the number of deduplication blockswhich are targets for duplication determination is small. When thenumber of target deduplication blocks for duplication determination issmall, the effect of reducing the amount of storage area consumption bythe deduplication process does not appear. For this reason, the storagesystem 1 maintains the selected logical page as deduplication logicalpage until the number of existing deduplication logical pages reaches orexceeds the threshold.

Note that the method of identifying the number of deduplication logicalpages is not limited to the method described above. As anotherembodiment, the storage system 1 can provide an area for recording thenumber of deduplication logical pages in advance in the system memory 12to identify the number of deduplication logical pages by increasing ordecreasing the number of deduplication logical pages recorded in thesystem memory 12 each time the process of changing the normal logicalpage to the deduplication page is performed, or vice versa.

When the number of deduplication logical pages is equal to or more thanthe threshold, the logical page change unit 125 further calculates thededuplication ratio by referring to the number of deduplicated blocks1267 of the selected logical page, to determine whether the calculatedvalue is equal to or more than the threshold. The deduplication ratiocan be obtained by “the number of deduplicated blocks 1267÷the number ofdeduplication blocks within the logical page”.

When the deduplication ratio is equal to or more than the threshold,this means that the amount of storage area consumption is reduced by thededuplication process, so that the logical page change unit 125determines that the selected logical page should be maintained asdeduplication logical page.

On the other hand, when the deduplication ratio is less than thethreshold, the effect of reducing the amount of storage area consumptionin the selected logical page is not significant, so that the necessityto maintain as deduplication logical page is low. Thus, the logical pagechange unit 125 determines that the selected logical page is notmaintained as deduplication logical page. When it is determined thatthere is no need to maintain the selected logical page as deduplicationlogical page (step 406: N), step 407 is performed next. When it isdetermined that the selected logical page needs to be maintained asdeduplication logical page (step 406: Y), step 407 is skipped.

Step 407: The logical page change unit 125 calls the deduplicationcancellation unit 124 to perform the deduplication cancellation processon the selected logical page. This process is a process of changing thededuplication logical page to a logical page with state P. The detailsof this process are described below.

Step 408: Of the logical pages of the virtual volume, the logical pagechange unit 125 determines whether there is a logical page on which theprocess of step 403 to step 407 has not been performed yet. When thereis a logical page on which the process of step 403 to step 407 has notbeen performed yet (step 408: Y), the logical page change unit 125performs step 402 again. When the process of step 403 to step 407 havebeen performed on all the logical pages within the virtual volume (step408: N), the logical page change unit 125 ends the process.

Note that in the example described above, in step 406, the logical pagechange unit 125 calculates the deduplication ratio to determine whetheror not the selected logical page is maintained as deduplication logicalpage based on the deduplication ratio. However, the logical page changeunit 125 can also determine whether or not the selected logical page ismaintained as deduplication logical page, by determining whether or notthe number of deduplicated blocks 1276 is equal to or more than apredetermined threshold, instead of calculating the deduplication ratio.This is because it is apparent that when the number of deduplicatedblocks 1267 is large, the deduplication ratio is actually also large,and when the number of deduplicated blocks 1267 is small, thededuplication ratio is actually also small. Further, in addition to thededuplication ratio and the number of deduplicated blocks 1267, otherindex values that can estimate the effect of reducing the amount ofstorage area consumption in the logical page can also be used for thedetermination of step 406.

Next, the flow of the deduplication process performed in step 405 isdescribed with reference to FIG. 11 and FIG. 12. FIG. 11 and FIG. 12 areflow charts of the processing that the deduplication processing unit 123performs. The deduplication processing unit 123 is called from thelogical page change unit 125 (step 405 in FIG. 14) to start theprocessing. At this time, the logical page change unit 125 notifies thededuplication processing unit 123 of the information of the logical pageto be processed (more specifically, the identifier of the virtual volumeto which the logical page belongs as well as the identifier of thelogical page). The deduplication processing unit 123 performs a processof changing the state of the notified logical page. In the followingdescription, the logical page notified by the logical page change unit125 is referred to as the “specified logical page”.

Step 102: The deduplication processing unit 123 identifies the physicalpage allocated to the specified logical page by referring to the logicalpage management table 126. Then, the deduplication processing unit 123reads the data stored in the physical page and stores in the cachememory 14.

Step 103: The deduplication processing unit 123 performs thededuplication process. Here, the deduplication processing unit 123performs the deduplication process for each deduplication block withinthe specified logical page. A deduplication is given below withreference to FIG. 12.

First, in step 201, the deduplication processing unit 123 prepares avariable k in such a way that the variable k indicates the firstdeduplication block of the logical page (more specifically, thededuplication processing unit 123 assigns the identifier of the firstdeduplication block of the specified logical page to k). In thefollowing description, the deduplication block indicated by the variablek is referred to as the “selected deduplication block”.

Next, of the data stored in the cache memory 14 in step 102, thededuplication processing unit 123 selects (identifies) the data of theselected deduplication block (step 202). Next, the deduplicationprocessing unit 123 reads the identified data, and calculates thefingerprint of the data (step 203).

Next, in step 204, the deduplication processing unit 123 searches for arecord in which the same value as the fingerprint calculated in step 203is stored in the fingerprint 1291, by referring to the search table 129.When there is a record (step 205: Y), step 207 is performed. When thereis no appropriate record (step 205: N), step 206 is performed.

In step 206, the deduplication processing unit 123 generates a recordconfigured with the fingerprint calculated in step 203 as well as thepositional information of the selected deduplication block. Then, thededuplication processing unit 123 adds the generated record to thesearch table 129. Then, step 208 is performed.

In step 207, the deduplication processing unit 123 reads the data fromthe deduplication block identified by the column “deduplication block1292” of the record that is obtained as a result of the search in step204. More specifically, the deduplication processing unit 123 refers tothe physical page 1275 and the data block 1276 in the mapping table 127to identify the data block that is allocated to the identifieddeduplication block, and reads the data from the identified data block.Then, the deduplication processing unit 123 compares the read data withthe data selected in step 202 byte by byte to determine whether the twomatch. When the two match (step 207: Y), step 210 is performed next.

If identifiers of a plurality of deduplication blocks are stored in thededuplication block 1292 of the record of the search table 129 that isobtained by the search in step 204, the deduplication processing unit123 also compares data of the deduplication blocks in the same manner.Further, when a plurality of records of the search table 129 is obtainedas a result of the search, the deduplication processing unit 123compares data on each record in the same manner. If any deduplicationblock does not match the data selected in step 202 as a result of thecomparison (step 207: N), step 206 is performed next.

In step 208, the deduplication processing unit 123 assigns a data blockto which the data selected in step 202 is written. More specifically,the deduplication processing unit 123 selects the address of the datablock recorded in the following pointer 131, as the data storagedestination. Then, the deduplication processing unit 123 adds the sizeof the data block to the following pointer 131. If the value of thefollowing pointer 131 is the last address of the physical page, thededuplication processing unit 123 selects an unused physical page byreferring to the pool management table 128, changes this physical pageto the physical page for data block storage, and stores the head addressof the selected physical page into the following pointer 131.

Next, in step 209, the deduplication processing unit 123 writes the dataselected in step 202 into the physical page (storage device 15) havingthe assigned data block. Further, the deduplication processing unit 123records, the dereference table 130, the information of the deduplicationblock to which the data block assigned in step 208 is allocated. Morespecifically, the deduplication processing unit 123 stores theidentifier of the deduplication block to be processed into thededuplication block 1303 of the record of the dereference table 130 thatcorresponds to the data block.

Step 210 is a process that is performed when the duplicate data of thedata selected in step 202 is present in a data block that has alreadybeen allocated to another deduplication block. In step 210, thededuplication processing unit 123 adds 1 to the number of deduplicatedblocks 1267 of the specified logical page. Note that, in this case,unlike step 208 to step 209, the data selected in step 202 is notwritten to the storage device 15.

In step 211, the deduplication processing unit 123 adds the identifierof the selected deduplication block into the column “deduplication block1292” of the record of the search table 129 in which the matching datais found as a result of step 207.

In step 212, of the records of the mapping table 127, the deduplicationprocessing unit 123 updates the record of the selected deduplicationblock. If the determination in step 207 is positive, namely, when thereis a data block in which the duplicate data of the data selected in step202 is stored, the deduplication processing unit 123 registers thephysical page identifier of the data block as well as the data blockaddress into the record of the mapping table 127. At this time, thededuplication processing unit 123 stores “TRUE”, which is the valueindicating that the deduplication block is the deduplication blockalready reduced, into the column “reduced flag 1277” of this record.

On the other hand, when the data block in which the duplicate data ofthe data selected in step 202 is not present (namely, when thedetermination in step 205 or step 207 is negative), the deduplicationprocessing unit 123 registers the physical page identifier of the datablock to which the data is written in step 206 as well as the data blockidentifier into the record of the mapping table 127. At this time,“FALSE” is stored in the column “reduced flag 1277” of the record inwhich the identifiers are registered.

Further, when the determination in step 207 is either positive ornegative, the fingerprint value calculated in step 203 is stored in thecolumn “fingerprint 1274” of the record.

When the variable k is equal to the end address within the logical page,namely, when the process up to step 212 is completed on alldeduplication blocks (step 213: Y), this process (step 103) iscompleted. When there are deduplication data blocks on which the processup to step 212 has not been completed (step 213: N), the deduplicationprocessing unit 123 updates the variable k (by adding the size of thededuplication block to the variable k) so that the variable k indicatesthe next deduplication block, and performs the process again from step202. This is the content of the process performed in step 103.

Now return to the description of FIG. 11. In step 104 and step 105, thededuplication processing unit 123 cancels the allocation of the physicalpage that is allocated to the specified logical page.

Step 104: Of the records of the pool management table 128, thededuplication processing unit 123 changes the use state 1282 of therecord of the allocated physical page to “unused”, and changes thelogical page 1283 to NULL.

Step 105: of the records of the logical page management table 126, thededuplication processing unit 123 changes the content of the record ofthe specified logical page. More specifically, the physical page 1264and the last write time 1266 in this record are changed to NULL. Then,“invalid” is store in the deduplication 1263 and “Q” is stored in thestate 1265. When the process up to step 105 is completed, thededuplication processing unit 123 ends the process.

Next, the flow of the deduplication cancellation process performed instep 407 or step 608 is described with reference to FIG. 13. FIG. 13 isa flow chart of the process performed by the deduplication cancellationunit 124. The deduplication cancellation unit 124 is called by thelogical page change unit 125 or the I/O processing unit 121, and startsthe process.

At this time, the logical page change unit 125 or the I/O processingunit 121 notifies the deduplication cancellation unit 124 of theinformation of the logical page to be processed (more specifically, theidentifier of the virtual volume to which the logical page belongs, andthe logical page identifier). The deduplication cancellation unit 124performs a process of changing the state of the notified logical page.In the following description, the logical page identified by theinformation that is notified to the deduplication cancellation unit 124is referred to as the “specified logical page”.

Step 302: The deduplication cancellation unit 124 identifies the datablock allocated to each deduplication block of the specified logicalpage by referring to the mapping table 127. Then, the deduplicationcancellation unit 124 reads the data stored in all specified datablocks, and stores in the cache memory 14.

Step 303: The deduplication cancellation unit 124 allocates an unusedphysical page to the specified logical page. The process of allocating aphysical page is the same as that described in step 602.

Step 304: The deduplication cancellation unit 124 updates the content ofthe record of the logical page management table 126 that corresponds tothe specified logical page. More specifically, the content update isperformed as follows. First, the deduplication 1263 of the record ischanged to “invalid”, and the number of deduplicated blocks 1267 ischanged to 0. Further, at the time of execution of step 303, theidentifier of the allocated physical page is stored in the physical page1263, so that the physical page 1263 is not updated here.

Step 305: The deduplication cancellation unit 124 destages the data thatis stored in the cache memory 14 in step 302 into the physical page thatis allocated in step 303.

Step 306: Of the records of the mapping table 127, the deduplicationcancellation unit 124 updates the content of the record that manages theinformation of each deduplication block included in the specifiedlogical page. Here, the physical page 1275 and the data block 1276 ineach record are changed to NULL. Note that, at this time, thefingerprint 1274 and the reduced flag 1277 are not updated and maintaintheir original values.

Step 307: The deduplication cancellation unit 124 identifies thephysical page having data blocks allocated to each of the deduplicationblocks of the specified logical page. More specifically, of the recordsof the mapping table 127, the deduplication cancellation unit 124searches for a record in which the identifier of the specified logicalpage and the information of the column “logical page 1272” match withFALSE for the reduced flag 1277. Then, the deduplication cancellationunit 124 extracts the information of the physical page 1275 from eachrecord obtained as a result of the search without duplication. In step307, one or more physical pages may be identified. Further, only recordswith FALSE for the reduced flag 1277 are searched here, so that thededuplication blocks already reduced are excluded from the searchresult.

Step 308: The deduplication cancellation unit 124 changes the physicalpage identified in step 307 to an unallocated state. In the presentembodiment, the process of changing the physical page used for datablock storage to au unallocated state is referred to as the “physicalpage release process”. Further, putting the physical page into anunallocated state may be expressed as “releasing the physical page”.

Before the execution of step 308, there may be a case in which some datablocks that are still shared by a plurality of deduplication blocks arepresent in the physical page to be released. Hereinafter, such datablocks are referred to as the shared data blocks. Further the data ofthe shared data block is referred to as the shared data.

Before changing the physical page to an unallocated state, the physicalpage release process moves (copies) the shared block of the physicalpage to a data block of another physical page. Then, the physical pagerelease process changes the deduplication block to which the shared datablock is allocated, to the state in which the duplication destinationdata block is allocated. Then, the physical page release process changesthe target physical page to an unallocated state.

The physical page release process is performed by the physical pagerelease processing unit 132. In step 308, of the identifiers of thephysical pages identified in step 307, the deduplication cancellationunit 124 notifies the physical page release processing unit 132 of theidentifiers excluding that of the physical page recorded in thefollowing pointer 131. The physical page release processing unit 132performs the physical page release process on the notified physicalpages.

The flow of processing in the physical page release processing unit 132will be described with reference to FIG. 17. FIG. 17 is a flow chart ofthe processing that the physical page release processing unit 132performs.

Step 802: The physical page release processing unit 132 selects one ofthe identifiers of the notified physical pages. The physical pageidentified by the selected physical page identifier is referred to asthe processing target physical page.

Step 803: The physical release processing unit 132 selects one of thedata blocks included in the processing target physical page. In thefollowing description, the data block selected in step 803 is referredto as the processing target data block.

Step 804: The physical page release processing unit 132 refers to therecord of the dereference table 130 that corresponds to the processingtarget data block, and identifies the deduplication block from theidentifier of the deduplication block stored in the deduplication block1303. The deduplication identified here is the deduplication block towhich the processing target data block is allocated in step 209(deduplication process).

Step 806: The physical page release processing unit 132 obtains thevalue of the fingerprint 1274 by referring to the record of the mappingtable 127 that corresponds to the deduplication block identified in step804.

Step 807: When the processing target data block is a shared data block,the physical page release processing unit 132 moves (copies) the data toa data block of another physical page, to change the state in such awaythat the deduplication block that shares the processing target datablock will share a duplication destination data block. The details ofstep 807 will be described below.

Step 808: The physical page release processing unit 132 determineswhether steps 804 to 807 have been performed on all the data blocksincluded in the processing target physical page. When there is a datablock on which steps 804 to 807 have not been performed (step 808: Y),the physical page release processing unit 132 selects the data blocknext to the processing target data block (step 803), and performs steps804 to 807. When step 804 to 807 have been performed on all the datablocks included in the processing target physical page (step 808: N),step 809 is performed.

Step 809: The physical page release processing unit 132 changes the usestate 1282 of the record of the pool management table 128 thatcorresponds to the processing target physical page into “unused”.

Step 810: With respect to all the data blocks included in the processingtarget physical page, the physical page release processing unit 132stores NULL in the deduplication block 1303 of the corresponding recordof the dereference table 130 for each data block.

Step 811: The physical page release processing unit 132 determineswhether steps 803 to 811 have been performed on all physical pagesnotified by the deduplication cancellation unit 124. When there arephysical pages on which step 803 to 811 have not been performed (step811: Y), the physical page release processing unit 132 selects one ofsuch physical pages (step 802), and performs the steps from step 803.When steps 803 to 811 have been performed on all the notified physicalpages (step 811: N), the physical page release process is completed.

The flow of the shared data determination/duplication process of step807 will be described with reference to FIG. 18. FIG. 18 is a flow chartof the shared data determination/duplication process.

Step 902: The physical page release processing unit 132 prepares aninternal variable “moved”, and sets FALSE as the default.

Step 903: The physical page release processing unit 132 searches thesearch table 129 to identify the record in which the fingerprintobtained in step 806 is included in the column of “fingerprint 1291” andthe identifier of the deduplication block obtained in step 804 isincluded in the column of “deduplication block 1292”.

Step 904: The physical page release processing unit 132 selects theidentifier of the deduplication block stored in the deduplication block1292 of the record identified in the search table 129.

Step 905: The physical page release processing unit 132 refers to therecord of the mapping table 127, which corresponds to the identifier ofthe deduplication block selected in step 904, and obtains various typesof information stored in the record.

Step 906: The physical page release processing unit 132 determineswhether or not the processing target data block is allocated to thededuplication block selected in step 904. When it is determined that theprocessing target data block is allocated to the selected deduplicationblock, the processing target data block should be the shared data block.The specific method of determination is as follows. That is, when thedata block identified by the physical page 1275 and data block 1276 ofthe record obtained in step 905 matches the processing target datablock, it is determined that the processing target data block isallocated. When the data blocks match (step 906: Y), the physical pagerelease processing unit 132 performs a process of moving (copying) thedata to a data block of another physical page and allocating theduplication destination data block to the deduplication block. Thisprocessing is performed by the mapping switch process in step 907. Theflow of the mapping switch process will be described later. When thedata blocks do not match (step 906: N), step 908 is performed next.

Note that when the deduplication block selected in step 904 is includedin the logical page to which the deduplication cancellation process hasbeen applied, the result of the determination of step 906 is “notmatching”. This is because NULL is stored in the physical page 1275 andthe data block 1276 in the record of the mapping table 127 thatcorresponds to the deduplication block.

Step 908: The physical page release processing unit 132 removes theidentifier of the deduplication block selected in step 904 from thededuplication block 1292 of the record of the search table 129 that isidentified in step 903. As a result, when the identifier of thededuplication block is not registered in the deduplication block 1292,namely, when the state of the deduplication block 1292 is blank, theidentified record is removed from the search table 129.

Step 909: The physical page release processing unit 132 stores NULL inthe fingerprint 1274 of the record of the mapping table 127 that isreferred to in step 905. Further, the physical page release processingunit 132 stores FALSE in the reduced flag 1277 of the same record.

Step 910: Of the identifiers stored in the deduplication block 1292 ofthe record of the search table 129 that is identified in step 903, thephysical page release processing unit 132 determines whether there is anidentifier on which steps 905 to 909 have not been performed. When thereare deduplication block identifiers on which steps 905 to 909 have notbeen performed yet (step 910: Y), the physical page release processingunit 132 selects one of them (step 904), and performs the process fromstep 905. If not (step 910: N), the physical page release processingunit 132 ends the process.

The flow of the mapping switch process of step 907 will be describedwith reference to FIG. 19. FIG. 19 is a flow chart of the mapping switchprocess.

The mapping switch process is a process of moving (copying) the data ofthe data block selected in step 803 to a data block of another physicalblock.

Step 1002: When the value of the internal variable “moved flag” that isprepared in step 902 is FALSE (step 1002: N), the physical page releaseprocessing unit 132 performs step 1003. When the moved flag is TRUE(step 1002: Y), step 1003 to step 1006 are skipped.

Step 1003: The physical page release processing unit 132 sets TRUE inthe moved flag.

Step 1004: The physical page release processing unit 132 assigns a datablock which is the duplication destination of the data block selected instep 803. The content of the process of assigning the data block is thesame as step 208 (deduplication process).

Step 1005: The physical page release processing unit 132 reads the dataof the data block selected in step 803, and writes to the data blockassigned in step 1003. This process is the same as step 209(deduplication process).

Step 1006: The physical page release processing unit 132 changes thededuplication block selected in step 904 from deduplication blockalready reduced to normal deduplication block. Thus, in step 1006, thephysical page release processing unit 132 subtracts 1 from the number ofdeduplicated blocks (the number of deduplicated blocks 1267 of thelogical page management table 126) of the logical page including theparticular deduplication block.

Step 1007: The physical page release processing unit 132 updates therecord of the mapping table 127 that corresponds to the deduplicationblock selected in step 904. The changes are as follows. First, thephysical page of the data block assigned in step 1004 and the identifierof the data block are stored respectively in the physical page 1275 andin the data block 1276. Next, when the moved flag is FALSE in step 1002,namely, when the deduplication block already reduced is changed to thenormal deduplication block, the content of the reduced flag 1277 ischanged to FALSE.

Although the embodiments of the present invention have been described,they are illustrative of the present invention and the present inventionis not intended to be limited to only these embodiments. In other words,the present invention can also be implemented in various otherembodiments.

The above has described an example in which several pieces ofinformation that the storage system uses are managed in a tablestructure such as the logical page management table 126. However, itshould be appreciated that the present invention is not limited to theaspect of managing information in the table structure. The storagesystem can also manage information by using a data structure other thantable, for example, a list structure.

Further, the storage system can perform a compression process inaddition to the deduplication process. For example, as a storage deviceincluded in the storage system, a storage device having a function(compression function) for compressing and storing data can be used tocompress data to be stored in the storage device. At this time, in orderto maintain access performance to data written in the normal logicalpage, it is desirable to store only data written in the deduplicationlogical page into the storage device having the compression function.Further, as another embodiment, the storage system can be configured toallow the CPU of the storage controller to compress data to be stored inthe storage device.

Further, the above has described an example in which, at the time whendata is written to a deduplication logical page, the storage systemfirst changes the deduplication logical page to a normal logical pageand then stores the data in the drive. However, it may be also possibleto store the written data to the drive without changing thededuplication logical page to a normal logical page. For example, whendata is written to the deduplication logical page, the storage systemcan assign an area of the physical page to store the data, and updatethe mapping relationship between the address of the deduplicationlogical page and the address of the physical page. In this case, it mayalso be possible to determine whether or not the deduplication logicalpage is returned to the normal logical page based on indexes such as theamount of data written to the deduplication logical page, the number oftimes of writing, and their amount per given period of time.

Further, the above has described an example in which, at the time whenthe deduplication logical page is changed to a normal logical page, thestorage system changes the physical page, in which the data of thelogical page before the change is stored, to an unused state. However,it may also be possible to change the physical page to an unused stateat an arbitrary timing, after changing the deduplication logical page toa normal logical page. For example, the storage system can determine thetiming to change the physical page to an unused state based on indexessuch as the number of unused physical pages, the number of physicalpages allocated to the logical page, the number of physical pages thatare allocated to store the data of the deduplication logical page, thenumber of deduplication logical pages, and the processing load of thehardware configuring the storage system. Further, the storage system canrecord information such as the amount of stored data and the amount ofreleased allocations to deduplication blocks, for each physical page.Then, based on the information for each physical page, the storagesystem can select the physical page to be changed to the unused state.

Further, the hardware configuration of the storage system is not limitedto the configuration described above. For example, a system in which oneor more storage devices are mounted on the computer described in theabove embodiments can be used as a storage system. Then, the samefunction as the storage system described in the above embodiments can beachieved by allowing the processor of the computer to execute each ofthe programs described in the above embodiments.

Further, the above embodiments have described an example in which thecomputer 5, which is the access request source, and the storage system 1have different hardware. However, as another embodiment, the computer 5and the storage system 1 can be implemented as a single hardware. Inother words, the storage control program executed by the storage system1 and the application program executed by the computer 5 can be executedon the same computer. In this case, it is possible to configure in suchaway that the application program as the access request source issues anI/O request to the storage control program, and that the storage controlprogram returns a response (read data when the I/O request is a readrequest) to the application program which is the access request source.It is preferable to forma virtual computer for executing the applicationprogram, as well as a virtual computer for executing the program for theI/O processing unit 121, the deduplication processing unit 123, and thelike, by allowing a program (such as hypervisor) for forming the virtualcomputers to be executed on the computer.

LIST OF REFERENCE SIGNS

1: storage system, 5: computer, 6: SAN, 10: storage controller, 11: CPU,12: system memory, 14: cache memory, 15: storage device, 121: I/Oprocessing unit, 123: deduplication processing unit, 124: deduplicationcancellation unit, 125: logical page change unit, 126: logical pagemanagement table, 127: mapping table, 128: pool management table, 129:search table, 130: dereference table, 131: following pointer, 132:physical page release processing unit

The invention claimed is:
 1. A storage system comprising: one or morestorage devices configured to store write data from a host computer; anda storage controller configured to provide one or more volumes to thehost computer, wherein, in response to receiving, from the hostcomputer, a respective write request and respective write target datafor a respective partition in a volume of the one or more volumes, thestorage controller is further configured to allocate, to the respectivepartition, a respective storage area of the one or more storage devicesthat has a same size as the respective partition, and store therespective write target data in the allocated respective storage area,wherein the storage controller is further configured to hold arespective last write time which is a time when a write request is lastreceived from the host computer, for each respective partition withinthe volume, wherein the storage controller, when the respectivepartition that does not receive another write request for apredetermined time or more from the respective last write time and whensame data as the data written to the partition from the host computerhas been stored in the one or more storage devices, is furtherconfigured to perform a deduplication process so as not to store thedata written to the respective partition in the one or more storagedevices and wherein the storage controller, in the deduplicationprocess, is further configured to: divide the respective partition intoa plurality of deduplication blocks, allocate, for each respectivededuplication block, a respective data block that has a same size as therespective deduplication block, and manage mapping between therespective deduplication block and the respective data block, andwherein the storage controller, when allocating a second data block to asecond deduplication block of the deduplication blocks, in a case thatthe data written to the second deduplication block is identical to datastored in a first data block allocated to a first deduplication block ofthe deduplication blocks, is further configured to allocate the firstdata block to the second deduplication block.
 2. The storage systemaccording to claim 1, wherein the storage controller is furtherconfigured to manage a state for each respective partition, therespective state of the respective partition includes a first statewhich is a state in which the deduplication process is not performed, asecond state which is a state in which the deduplication process isperformed, and a third state which is a state in which the partition isreturned from the second state to the state before the deduplicationprocess is performed, and wherein the storage controller, when adeduplication ratio of the respective partition is less than apredetermined threshold as a result of the execution of thededuplication process on the respective partition having the firststate, is configured to change the state of the respective partition tothe third state.
 3. The storage system according to claim 2, wherein therespective partition having the third state is not changed until anotherwrite request is issued from the host computer.
 4. The storage systemaccording to claim 3, wherein the storage controller, when another writerequest is issued from the host computer to the respective partitionhaving the second state or the third state, is configured to change thestate of the respective partition to the first state.
 5. The storagesystem according to claim 4, wherein the storage controller isconfigured to calculate a feature amount of the data written to therespective deduplication block, and manage mapping between thecalculated feature amount and the data block allocated to the respectivededuplication block, and wherein the storage controller, after thecalculation of the feature amount of the second deduplication block,when a same value as the feature amount of the second deduplicationblock is not stored in a search table, allocate the second data block tothe second deduplication block and store the data written to the seconddeduplication block in the second data block.
 6. A method forcontrolling a storage system, wherein the storage system includes one ormore storage devices configured to store write data from a hostcomputer, and a storage controller configured to provide one or morevolumes to the host computer, the storage controller performs the methodcomprising: allocating, in response to receiving from the host computera respective write request and respective write target data for arespective partition in a volume of the one or more volumes, arespective storage area of the one or more storage devices that has asame size as the respective partition to the respective partition, andstoring the respective write target data in the allocated first storagearea; recording a respective last write time, which is a time when awrite request is last received from the host computer, for eachrespective partition within the volume; detecting a respective partitionthat does not receive another write request for a predetermined time ormore from the respective last write time; performing a deduplicationprocess on the detected partition in such a way that, of the datawritten to the detected partition, only data different from data alreadystored in the one or more storage devices is stored in the one or morestorage devices; wherein the deduplication process includes: dividingthe detected partition into a plurality of deduplication blocks,allocating, for each respective deduplication block, a respective datablock that has a same size as the respective deduplication block, andmanaging mapping between the respective deduplication block and therespective data block, and wherein, when allocating a second data blockto a second deduplication block of the deduplication blocks, in a casethat the data written to the second deduplication block is identical todata stored in a first data block allocated to a first deduplicationblock of the deduplication blocks, allocating the first data block tothe second deduplication block.
 7. The method for controlling thestorage system according to claim 6, wherein a state of each respectivepartition includes a first state which is a state in which thededuplication process is not performed, a second state which is a statein which the deduplication process is performed, and a third state whichis a state in which the partition is returned from the second state tothe state before the deduplication process is performed, and wherein thededuplication process includes: when a deduplication ratio of thedetected partition is less than a predetermined threshold as a result ofthe execution of the deduplication process on the detected partitionhaving the first state, changing the state of the detected partition tothe third state.
 8. The method for controlling the storage systemaccording to claim 7, wherein the detected partition having the thirdstate is not changed until another write request is issued from the hostcomputer.
 9. The method for controlling the storage system according toclaim 8, further comprising: when another write request is issued to thedetected partition having the second state or the third state from thehost computer, changing the state of the detected partition to the firststate.
 10. A non-transitory, computer-readable storage medium thatrecords a program to be executed by a processor of a computer includingone or more storage devices for storing write data, wherein the programallows the processor to perform acts comprising: allocating, in responseto receiving from the host computer a respective write request andrespective write target data for a respective partition in a volume, arespective storage area of the one or more storage devices that has asame size as the respective partition to the respective partition, andstoring the respective write target data in the allocated respectivestorage area; holding a respective last write time, which is a time whena write request is last received, for each respective partition withinthe volume; detecting a respective partition that does not receiveanother write request for a predetermined time or more from therespective last write time; performing a deduplication process on thedetected partition in such a way that, of the data written to thedetected partition, only data different from data already stored in theone or more storage devices is stored in the one or more storagedevices; wherein the deduplication process includes: dividing thedetected partition into a plurality of deduplication blocks, allocating,for each respective deduplication block, a respective data block thathas a same size as the respective deduplication block, and managingmapping between the respective deduplication block and the respectivedata block, and wherein, when allocating a second data block to a seconddeduplication block of the deduplication blocks, in a case that the datawritten to the second deduplication block is identical to data stored ina first data block allocated to a first deduplication block of thededuplication blocks, allocating the first data block to the seconddeduplication block.
 11. The non-transitory, computer-readable storagemedium according to claim 10, wherein a state of each respectivepartition includes a first state which is a state in which thededuplication process is not performed, a second state which is a statein which the deduplication process is performed, and a third state whichis a state in which the partition is returned from the second state tothe state before the deduplication process is performed, and wherein thededuplication process includes: when a deduplication ratio of thedetected partition is less than a predetermined threshold as a result ofthe execution of the deduplication process on the detected partitionhaving the first state, changing the state of the detected partition tothe third state.
 12. The non-transitory, computer-readable storagemedium according to claim 11, wherein when another write request withrespect to the detected partition having the second state or the thirdstate is received, changing the state of the partition to the firststate.